Java: CAM v1.1.3 refactoring and new CAM v2.3.0#489
Java: CAM v1.1.3 refactoring and new CAM v2.3.0#489mathieu1fb merged 31 commits intoOrange-OpenSource:masterfrom
Conversation
This new implementation should be faster and is clearly versioned. Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
…nversion Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
…e simple methods Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
…2.3.0 implementations Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
…3 and v2.3.0 implementations Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
The user shouldn't have to set message type and version, so we set them. Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
…ckage Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
…ehicleContainer The SpecialVehicleContainer is actually not part of the JSON schema for this CAM version, and was anyway empty. Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
… CamWriter113 This container was not part of the CAM v1.1.3 spec and has been removed. Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
…CamValidator230 This field was wrongly expected to be mandatory. Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
…(...) method Note that handling both CAM versions in the same class makes imports messy since many 1.1.3 and 2.3.0 classes have the same name. Maybe we should add a version suffix to each class. Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Max value was erroneously set to 01-01-2028 in the JSON schema, which will break soon. Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
75e84e8 to
d094451
Compare
… Java SDK Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
fredOG-2A1
left a comment
There was a problem hiding this comment.
Have tested with your recommandations.
It works as expected:
Raw message received: {"type":"cam","origin":"self","version":"1.1.3","source_uuid":"uuid","timestamp":1773139624269,"message":...}}
Raw CAM v1.1.3: CamEnvelope113[type=cam, origin=self, version=1.1.3, sourceUuid=uuid, timestamp=1773140392318, message=CamMessage113[protocolVersion=2, stationId=95569549, generationDeltaTime=33150, basicContainer=BasicContainer[...], highFrequencyContainer=HighFrequencyContainer[...], lowFrequencyContainer=null]]
Raw message received: {"message_type":"cam","message_format":"json/raw","source_uuid":"uuid","timestamp":1773140102589,"version":"2.3.0","message":...}}}
Raw CAM v2.3.0: CamEnvelope230[messageType=cam, messageFormat=json/raw, sourceUuid=uuid, timestamp=1773140597331, version=2.3.0, message=CamStructuredData[protocolVersion=2, stationId=28036714, generationDeltaTime=41555, basicContainer=BasicContainer[...], highFrequencyContainer=BasicVehicleContainerHighFrequency[...]]
Huge work!
Just a thought, what about using static vars to avoid this kink of writings:
"source_uuid" or others. Replacing by SOURCE_UUID that contains 'source_uuid' ensure that no mispelling could occure.
Just a suggestion.
Thank you for the review! I have indeed considered using some sort of dictionary for all the JSON fields, but have not done so. I might do it in a future version. |
What's new
Close #485
Close #486
What to do
After reviewing code changes:
Iot3MobilityExampleclass in theexamplesmodule, and set appropriate values for the following fields:Iot3MobilityExamplefor a few seconds.CamVersion.V1_1_3parameter in theioT3Mobility.sendPosition(...)method byCamVersion.V2_3_0.Iot3MobilityExamplefor a few seconds.Expected results
Note: it is normal if source_uuid, station_id and timestamps differ in your test.